package ppa.application.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.w3c.dom.Node;

public class Step implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private int code;
	private String exposition;
	private Question question;
	private Next next;

	public Step() {
		this(0, "", null, null);
		this.question = new Question();
		this.next = new Next();
	}

	public Step(int code, String exp, Question qu, Next n) {
		this.code = code;
		this.exposition = exp;
		this.question = qu;
		this.next = n;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getExposition() {
		return exposition;
	}

	public void setExposition(String exposition) {
		this.exposition = exposition;
	}

	public Question getQuestion() {
		return question;
	}

	public void setQuestion(Question question) {
		this.question = question;
	}
	
	public Next getNext() {
		return next;
	}

	public void setNext(Next next) {
		this.next = next;
	}

	@Override
	public String toString() {
		return "Step [code=" + code + ", exposition=" + exposition
				+ ", question=" + question.toString() + ", next="
				+ next.toString() + "]";
	}
	
	

	public class Question implements Serializable{

		/**
		 * 
		 */
		private static final long serialVersionUID = 1L;
		private String label;
		private List<Integer> num;
		private List<String> choice;

		public Question() {
			this("");
		}

		public Question(String lab) {
			this.label = lab;
			this.num = new ArrayList<Integer>();
			this.choice = new ArrayList<String>();
		}

		public String getLabel() {
			return label;
		}

		public void setLabel(String label) {
			this.label = label;
		}

		public List<Integer> getNum() {
			return num;
		}

		public void setNum(List<Integer> num) {
			this.num = num;
		}

		public List<String> getChoice() {
			return choice;
		}

		public void setChoice(List<String> choice) {
			this.choice = choice;
		}

		@Override
		public String toString() {
			return "Question [label=" + label + ", num=" + num + ", code="
					+ code + "]";
		}
		

	}

	public class Next implements Serializable{

		/**
		 * 
		 */
		private static final long serialVersionUID = 1L;
		private List<Integer> value;
		private List<Integer> code;

		public Next() {
			this.value = new ArrayList<Integer>();
			this.code = new ArrayList<Integer>();
		}

		public List<Integer> getValue() {
			return value;
		}

		public void setValue(List<Integer> value) {
			this.value = value;
		}

		public List<Integer> getCode() {
			return code;
		}

		public void setCode(List<Integer> code) {
			this.code = code;
		}

		@Override
		public String toString() {
			return "Next [value=" + value + ", code=" + code + "]";
		}
	}

	}
